<%@page import="com.mbbmap.util.EncryptionHelper"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import = "org.json.simple.*, java.util.TreeMap, com.classes.Casemast, com.classes.CaseOutlet, com.classes.Outlet, com.classes.Interchange, java.util.ArrayList, java.text.DecimalFormat" %>
<%@ page import = "com.mbbmap.util.Constants" %>
<%@ page import = "com.mbbmap.security.dao.*" %>
<%@ include file="/jsp/map/include/user-dao.jsp" %>	
<%
long merchant_id = 0;
long case_id = 0;
long o_id=0;

String reg_name="";
//calculation variables
double c10=0,c128=0,f67=0,f5=0,f6=0,f16=0,f17=0,f18=0,f19=0,g16=0,g17=0,g18=0,g19=0,h16=0,h17=0,h18=0,h19=0,i16=0,i17=0,i18=0,i19=0;

double f8=0,f10=0,f12=0,f68=0,f70=0,f71=0,f76=0,f77=0,f78=0,f79=0,f80=0,f81=0;
double f107=0,f108=0,g107=750,g108=1400;
double f22=0,f23=0,f24=0,f25=0,f26=0,f27=0,f28=0;
double g22=0,g23=0,g24=0,g25=0,g26=0,g27=0,g28=0;
double c103=0,c106=0,c107=0,c108=0,c109=0,c110=0,c111=0,c112=0,c113=0,c114=0,c115=0,c116=0,c133=0,c134=0;

double c9=0,c12=0,c14=0,c15=0,c17=0,c18=0,c19=0,c21=0,c22=0,c23=0,c24=0,c26=0,c27=0,c28=0,c29=0,c30=0,c31=0,c32=0,c33=0,c34=0,c35=0,c37=0,c39=0;
double c41=0,c42=0,c44=0,c45=0,c46=0,c48=0,c49=0,c50=0,c51=0,c53=0,c54=0,c55=0,c56=0,c57=0,c58=0,c59=0,c60=0,c61=0,c62=0,c63=0,c64=0;
double c66=0,c68=0,c69=0,c71=0,c72=0,c73=0,c75=0,c76=0,c79=0,c80=0,c81=0,c82=0,c84=0,c87=0,c89=0,c90=0,c91=0,c92=0,c93=0,c94=0,c95=0;
double c96=0,c97=0,c98=0,c99=0,c101=0,c117=0,c119=0,c120=0,c121=0;
double c122=0,c123=0,c124=0,c126=0,c127=0,c129=0,c130=0,c131=0,c132=0,c136=0,c137=0,c138=0,c139=0,c140=0,c141=0,c143=0,c144=0,c145=0;
double f88=0,f89=0;
double f9=0,f11=0,f13=0,f69=0,f90=0,f117=0,h107=0,h108=0,f109=0,h109=0;
double c146=0;

f71 = 1.75;

if(request.getAttribute("m_case") != null){
	Casemast m_case = (Casemast) request.getAttribute("m_case");
	merchant_id = m_case.getMerchant().getId();
	case_id = m_case.getId();
	reg_name = m_case.getMerchant().getRegisteredName();	
	
	if(m_case.getMerchant().getAvgTicketSize().length() > 0){
		c128 = Double.parseDouble(m_case.getMerchant().getAvgTicketSize());
	}
}


String case_outlet_opt = "<option value=\"\"></option>";

if(request.getAttribute("c_outlets") != null) {
	ArrayList<CaseOutlet> c_outlets = ((ArrayList<CaseOutlet>)request.getAttribute("c_outlets"));

	for(CaseOutlet c : c_outlets) {
		case_outlet_opt += "<option value=\"" + EncryptionHelper.encrypt(c.getOutlet().getId()+"") + "\">" + c.getOutlet().getName() + "</option>";
	}
}

//Double.parseDouble(i_mcccode.getIfvln())
if(request.getAttribute("i_mcccode") != null) {
	//Interchange i_mcccode = i.getMccRate(mcc);
	Interchange i_mcccode = (Interchange) request.getAttribute("i_mcccode");
	
	f16=Double.parseDouble(i_mcccode.getIfvln());
	g16=Double.parseDouble(i_mcccode.getIfvlh());
	h16=Double.parseDouble(i_mcccode.getIfvlm());
	i16=Double.parseDouble(i_mcccode.getIfvlec());
	f17=Double.parseDouble(i_mcccode.getIfvfn());
	g17=Double.parseDouble(i_mcccode.getIfvfh());
	h17=Double.parseDouble(i_mcccode.getIfvfm());
	i17=Double.parseDouble(i_mcccode.getIfvfec());
	f18=Double.parseDouble(i_mcccode.getIfmcln());
	g18=Double.parseDouble(i_mcccode.getIfmclh());
	h18=Double.parseDouble(i_mcccode.getIfmclm());
	i18=Double.parseDouble(i_mcccode.getIfmclec());
	f19=Double.parseDouble(i_mcccode.getIfmcfn());
	g19=Double.parseDouble(i_mcccode.getIfmcfh());
	h19=Double.parseDouble(i_mcccode.getIfmcfm());
	i19=Double.parseDouble(i_mcccode.getIfmcfec());
}
if(request.getAttribute("c_outlet") != null) {
	CaseOutlet c_outlet = (CaseOutlet) request.getAttribute("c_outlet");
	
	if(c_outlet.getOutlet().getMDRRate().length() > 0) {
		JSONObject obj = (JSONObject) JSONValue.parse(c_outlet.getOutlet().getMDRRate());
		double dmdr1=0,dmdr2=0;
		f5 = (obj.get("30") == null || obj.get("30").toString().length() <= 0) ? 0 : Double.parseDouble(obj.get("30").toString());
		f6 = (obj.get("38") == null || obj.get("38").toString().length() <= 0) ? 0 : Double.parseDouble(obj.get("38").toString()); 
		f67 = (obj.get("307") == null || obj.get("307").toString().length() <= 0) ? 0 : Double.parseDouble(obj.get("307").toString());
		dmdr1 = (obj.get("78") == null || obj.get("78").toString().length() <= 0) ? 0 : Double.parseDouble(obj.get("78").toString());
		dmdr2 = (obj.get("86") == null || obj.get("86").toString().length() <= 0) ? 0 : Double.parseDouble(obj.get("86").toString());
		f89 = (obj.get("116") == null || obj.get("116").toString().length() <= 0) ? 0 : Double.parseDouble(obj.get("116").toString());
		
		if(dmdr1>0)
			f88=dmdr1;
		else
			f88= dmdr2>0? dmdr2:0; 	
		//System.out.println(dmdr1 + "--" + dmdr2 + "--" +f88);
		
		if(c_outlet.getOutlet().getEsapl().length() > 0){
			JSONObject obj2 = (JSONObject) JSONValue.parse(c_outlet.getOutlet().getEsapl());
			
			f8 = (obj2.get("vm_visap") == null || obj2.get("vm_visap").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("vm_visap").toString());
			f10 = (obj2.get("vm_onusp") == null || obj2.get("vm_onusp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("vm_onusp").toString());
			f12 = (obj2.get("vm_forp") == null || obj2.get("vm_forp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("vm_forp").toString());
			f22 = (obj2.get("v_petrolp") == null || obj2.get("v_petrolp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("v_petrolp").toString());
			f23 = (obj2.get("v_govp") == null || obj2.get("v_govp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("v_govp").toString());
			f24 = (obj2.get("v_charp") == null || obj2.get("v_charp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("v_charp").toString());
			f25 = (obj2.get("v_emarp") == null || obj2.get("v_emarp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("v_emarp").toString());
			f26 = (obj2.get("v_insurp") == null || obj2.get("v_insurp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("v_insurp").toString());
			f27 = (obj2.get("v_supp") == null || obj2.get("v_supp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("v_supp").toString());
			f28 = (obj2.get("v_utip") == null || obj2.get("v_utip").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("v_utip").toString());
			g22 = (obj2.get("m_petrolp") == null || obj2.get("m_petrolp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("m_petrolp").toString());
			g23 = (obj2.get("m_govp") == null || obj2.get("m_govp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("m_govp").toString());
			g24 = (obj2.get("m_charp") == null || obj2.get("m_charp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("m_charp").toString());
			g25 = (obj2.get("m_emarp") == null || obj2.get("m_emarp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("m_emarp").toString());
			g26 = (obj2.get("m_insurp") == null || obj2.get("m_insurp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("m_insurp").toString());
			g27 = (obj2.get("m_supp") == null || obj2.get("m_supp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("m_supp").toString());
			g28 = (obj2.get("m_utip") == null || obj2.get("m_utip").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("m_utip").toString());
			f68 = (obj2.get("a_onusp") == null || obj2.get("a_onusp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("a_onusp").toString());
			f70 = (obj2.get("a_plan") == null || obj2.get("a_plan").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("a_plan").toString());
			f71 = (obj2.get("a_intp") == null || obj2.get("a_intp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("a_intp").toString());
			
			f76 = (obj2.get("intf_petrol") == null || obj2.get("intf_petrol").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("intf_petrol").toString());
			f77 = (obj2.get("intf_ffood") == null || obj2.get("intf_ffood").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("intf_ffood").toString());
			f78 = (obj2.get("intf_insur") == null || obj2.get("intf_insur").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("intf_insur").toString());
			f79 = (obj2.get("intf_edu") == null || obj2.get("intf_edu").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("intf_edu").toString());
			f80 = (obj2.get("intf_gov") == null || obj2.get("intf_gov").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("intf_gov").toString());
			f81 = (obj2.get("intf_hyp") == null || obj2.get("intf_hyp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("intf_hyp").toString());
			//f88 = (obj2.get("d_mdr") == null || obj2.get("d_mdr").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("d_mdr").toString());
			f89 = (obj2.get("d_onusp") == null || obj2.get("d_onusp").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("d_onusp").toString());
			f107 = (obj2.get("edc_wn") == null || obj2.get("edc_wn").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("edc_wn").toString());
			f108 = (obj2.get("edc_wln") == null || obj2.get("edc_wln").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("edc_wln").toString());
			g107 = (obj2.get("edc_wc") == null || obj2.get("edc_wc").toString().length() <= 0) ? 750 : Double.parseDouble(obj2.get("edc_wc").toString());
			g108 = (obj2.get("edc_wlc") == null || obj2.get("edc_wlc").toString().length() <= 0) ?1400 : Double.parseDouble(obj2.get("edc_wlc").toString());
			
			c103 = (obj2.get("ter_rental") == null || obj2.get("ter_rental").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("ter_rental").toString());
			c106 = (obj2.get("lterm_cost") == null || obj2.get("lterm_cost").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("lterm_cost").toString());
			c107 = (obj2.get("ledc_cost") == null || obj2.get("ledc_cost").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("ledc_cost").toString());
			c108 = (obj2.get("lsetup_leaseline") == null || obj2.get("lsetup_leaseline").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("lsetup_leaseline").toString());
			c109 = (obj2.get("lots_cost") == null || obj2.get("lots_cost").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("lots_cost").toString());
			c110 = (obj2.get("lsim_cost1") == null || obj2.get("lsim_cost1").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("lsim_cost1").toString());
			c111 = (obj2.get("ctel_charge") == null || obj2.get("ctel_charge").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("ctel_charge").toString());
			c112 = (obj2.get("lspon_fee") == null || obj2.get("lspon_fee").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("lspon_fee").toString());
			c113 = (obj2.get("lamex_tgfee") == null || obj2.get("lamex_tgfee").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("lamex_tgfee").toString());
			c114 = (obj2.get("lsign_fee") == null || obj2.get("lsign_fee").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("lsign_fee").toString());
			c115 = (obj2.get("lsetup_fee") == null || obj2.get("lsetup_fee").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("lsetup_fee").toString());
			c116 = (obj2.get("lsim_cost2") == null || obj2.get("lsim_cost2").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("lsim_cost2").toString());
			c133 = (obj2.get("edc_nombb") == null || obj2.get("edc_nombb").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("edc_nombb").toString());
			c134 = (obj2.get("edc_mcost") == null || obj2.get("edc_mcost").toString().length() <= 0) ? 0 : Double.parseDouble(obj2.get("edc_mcost").toString());
			
		}
	}
	
	if(c_outlet.getRecommendation().toString().length() > 0){
		JSONObject recom = (JSONObject) JSONValue.parse(c_outlet.getRecommendation());
		if(recom != null) {
			c10 = (recom.get("projected_card_sales") == null || recom.get("projected_card_sales").toString().length() <= 0) ? (recom.get("proven_card_sales") == null || recom.get("proven_card_sales").toString().length() <= 0) ? 0 : Double.parseDouble(recom.get("proven_card_sales").toString()) : Double.parseDouble(recom.get("projected_card_sales").toString());
			c10 = c10*12;
			c103 =((recom.get("terminal_rental_amount") == null || recom.get("terminal_rental_amount").toString().length() <= 0) ? 0 : Double.parseDouble(recom.get("terminal_rental_amount").toString().substring(3))) + ((recom.get("terminal_rental_wired") == null || recom.get("terminal_rental_wired").toString().length() <= 0) ? 0 : Double.parseDouble(recom.get("terminal_rental_wired").toString())) + ((recom.get("terminal_rental_wireless") == null || recom.get("terminal_rental_wireless").toString().length() <= 0) ? 0 : Double.parseDouble(recom.get("terminal_rental_wireless").toString()));
			c103 = c103 * 12;
		}
	}
	
	
	case_outlet_opt = case_outlet_opt.replace("<option value=\"" + EncryptionHelper.encrypt(c_outlet.getOutlet().getId()+"") + "\">", "<option value=\"" + EncryptionHelper.encrypt(c_outlet.getOutlet().getId()+"") + "\" selected>");
	o_id=c_outlet.getOutlet().getId();
}



//calculation start here

DecimalFormat twoDForm = new DecimalFormat("#.00");

try {
c66=Double.parseDouble(twoDForm.format(c10*0.10));
c89=Double.parseDouble(twoDForm.format(c10*0.10));
c9= Double.parseDouble(twoDForm.format(c10+c66+c89));
c12=Double.parseDouble(twoDForm.format(c10*(f8/100)));
c14=Double.parseDouble(twoDForm.format(c12*(f10/100)));
c15=Double.parseDouble(twoDForm.format(c14*(f5/100)));

f9= Double.parseDouble(twoDForm.format(100-f8));
f11= Double.parseDouble(twoDForm.format(100-f10));
f13= Double.parseDouble(twoDForm.format(100-f12));
f69= Double.parseDouble(twoDForm.format(100-f68));
f90= Double.parseDouble(twoDForm.format(100-f89));
c117=  Double.parseDouble(twoDForm.format(c106+c107+c108+c109+c110+c111+c112+c113+c114+c115));

h107= Double.parseDouble(twoDForm.format(f107*g107));
h108= Double.parseDouble(twoDForm.format(f108*g108));
f109= Double.parseDouble(twoDForm.format(f107+f108));
h109= Double.parseDouble(twoDForm.format(h107+h108));

c14= Double.parseDouble(twoDForm.format(c12*f10/100));
c15=Double.parseDouble(twoDForm.format((c14)*(f5)/100));
c17=Double.parseDouble(twoDForm.format(0.035*30*(c14)/365));
c18=Double.parseDouble(twoDForm.format((c14)*0.0004));
c19=Double.parseDouble(twoDForm.format((c15)-(c17)-(c18)));
c21=Double.parseDouble(twoDForm.format((c12)*(f11)/100));
c22=Double.parseDouble(twoDForm.format((c21)*(f13)/100));
c23=Double.parseDouble(twoDForm.format((c21)-(c22)));
c24=Double.parseDouble(twoDForm.format((c21)*(f6)/100));
c26=Double.parseDouble(twoDForm.format((c22)*(f16)/100));
c27=Double.parseDouble(twoDForm.format((c23)*(f17)/100));
c28=Double.parseDouble(twoDForm.format((c21)*0.0007)); 
if(c128!=0)c29=Double.parseDouble(twoDForm.format((c22)/(c128)*0.0233));
if(c128!=0)c30=Double.parseDouble(twoDForm.format((c23)/(c128)*0.264));
c31=Double.parseDouble(twoDForm.format((c23)*0.002));
c32=Double.parseDouble(twoDForm.format((c23)*0.004));
c33=Double.parseDouble(twoDForm.format(0.035*3*(c21)/365));
c34=Double.parseDouble(twoDForm.format((c26)+(c27)+(c28)+(c29)+(c30)+(c31)+(c32)+(c33)));
c35=Double.parseDouble(twoDForm.format((c24)-(c34))); 
c37=Double.parseDouble(twoDForm.format((c35)+(c19)));
c39=Double.parseDouble(twoDForm.format((c10)*(f9)/100));
c41=Double.parseDouble(twoDForm.format((c39)*0.1));
c42=Double.parseDouble(twoDForm.format((c41)*(f5)/100));
c44=Double.parseDouble(twoDForm.format(0.035*30*(c41)/365));
c45=Double.parseDouble(twoDForm.format((c41)*0.0006));
c46=Double.parseDouble(twoDForm.format((c42)-(c44)-(c45)));
c48=Double.parseDouble(twoDForm.format((c39)*0.9)); 
c49=Double.parseDouble(twoDForm.format((c48)*(f13)/100));
c50=Double.parseDouble(twoDForm.format((c48)*(f12)/100));
c51=Double.parseDouble(twoDForm.format((c48)*(f6)/100));
c53=Double.parseDouble(twoDForm.format((c49)*(f18)/100));
c54=Double.parseDouble(twoDForm.format((c50)*(f19)/100));
c55=Double.parseDouble(twoDForm.format((c49)*0.0002)); 
c56=Double.parseDouble(twoDForm.format((c50)*0.00184));

if(c128 != 0){
	c57=Double.parseDouble(twoDForm.format((c49)/(c128)*0.0155));
	c58=Double.parseDouble(twoDForm.format((c50)/(c128)*0.0155));
	c59=Double.parseDouble(twoDForm.format((c49)/(c128)*0.109));
	c60=Double.parseDouble(twoDForm.format((c50)/(c128)*0.2635));
}

c61=Double.parseDouble(twoDForm.format(0.035*3*(c48)/365)); 
c62=Double.parseDouble(twoDForm.format((c53)+(c54)+(c55)+(c56)+(c57)+(c58)+(c59)+(c60)+(c61)));
c63=Double.parseDouble(twoDForm.format((c51)-(c62)));
c64=Double.parseDouble(twoDForm.format((c63)+(c46)));
c66=Double.parseDouble(twoDForm.format((c10)*0.1));

c68=Double.parseDouble(twoDForm.format((c66)*(f68)/100));
c69=Double.parseDouble(twoDForm.format((c68)*(f67)/100));
c71=Double.parseDouble(twoDForm.format(0.035*30*(c68)/365));
c72=Double.parseDouble(twoDForm.format((c68)*0.0058));
c73=Double.parseDouble(twoDForm.format((c69)-(c71)-(c72)));
c75=Double.parseDouble(twoDForm.format((c66)*(f69)/100));
c76=Double.parseDouble(twoDForm.format((c75)*(f67)/100));
c79=Double.parseDouble(twoDForm.format((c75)*(f71)/100));
c80=Double.parseDouble(twoDForm.format(0.035*(3-(f70))*(c75)/365));
c81=Double.parseDouble(twoDForm.format((c75)*0.0029));
c82=Double.parseDouble(twoDForm.format((c76)-(c79)-(c80)-(c81)));
c84=Double.parseDouble(twoDForm.format((c73)+(c82)));
c87=Double.parseDouble(twoDForm.format((c64)+(c37)+(c84)));

c89=Double.parseDouble(twoDForm.format((c10)*0.1));
c90=Double.parseDouble(twoDForm.format((c89)*(f89/100)));
c91=Double.parseDouble(twoDForm.format((c90)*(f88/100)));
if(c128!=0)c92=Double.parseDouble(twoDForm.format((c90)/(c128)*0.05));
c93=Double.parseDouble(twoDForm.format((c91)-(c92)));
c94=Double.parseDouble(twoDForm.format((c89)*(f90)/100));
c95=Double.parseDouble(twoDForm.format((c94)*(f88)/100));
c96=Double.parseDouble(twoDForm.format((c94)*0.0015));
c97=Double.parseDouble(twoDForm.format((c94)*0.004));
c98=Double.parseDouble(twoDForm.format((c95)-(c96)-(c97)));
c99=Double.parseDouble(twoDForm.format((c98)+(c93)));
c101=Double.parseDouble(twoDForm.format((c87)+(c99)));

c119=Double.parseDouble(twoDForm.format((c101)-(c117)));
c120=Double.parseDouble(twoDForm.format((c119)*0.75));
c137=Double.parseDouble(twoDForm.format((c15)-(c17)+(c24)-(c26)-(c27)-(c33)+(c42)-(c44)+(c51)-(c53)-(c54)-(c61)+(c69)-(c71)+(c76)-(c79)-(c80)+(c91)+(c95)-(c97)));
c143=Double.parseDouble(twoDForm.format((c137)*0.15*12.5));
c144=Double.parseDouble(twoDForm.format((c143)*0.13));
c145=Double.parseDouble(twoDForm.format((c144)*0.4));
c120=Double.parseDouble(twoDForm.format((c119)*0.75));
c121=Double.parseDouble(twoDForm.format((c145)*0.04));
c122=Double.parseDouble(twoDForm.format((c120)-(c121)));
c146=Double.parseDouble(twoDForm.format((c144)*0.6));
c123=Double.parseDouble(twoDForm.format((c146)*0.11));
c124=Double.parseDouble(twoDForm.format((c122)-(c123)));
c127=Double.parseDouble(twoDForm.format((c9)));
if(c128!=0)c126=Double.parseDouble(twoDForm.format((c127)/(c128)));
if(c9!=0) c129=Double.parseDouble(twoDForm.format((c119)/(c9)));
if(c12!=0) c130=Double.parseDouble(twoDForm.format((c37)/(c12)));
if(c39!=0) c131=Double.parseDouble(twoDForm.format((c64)/(c39)));
c136=Double.parseDouble(twoDForm.format((c18)+(c28)+(c29)+(c30)+(c31)+(c32)+(c45)+(c55)+(c56)+(c57)+(c58)+(c59)+(c60)+(c72)+(c81)+(c92)+(c96)+(c106)+(c107)+(c108)+(c109)+(c110)+(c111)+(c112)+(c113)));//c136=Double.parseDouble(twoDForm.format((c18)+(c28)+(c29)+(c30)+(c31)+(c325)+(c45)+(c55)+(c56)+(c57)+(c58)+(c598)+(c60)+(c72)+(c81)+(c92)+(c96)+(c106)+(c107)+(c108)+(c109)+(c110)+(c111)+(c112)+(c113)));
if(c137!=0)c138=Double.parseDouble(twoDForm.format((c136)/(c137)));
if(c143!=0)c139=Double.parseDouble(twoDForm.format((c119)/(c143)));
if(c144!=0)c141=Double.parseDouble(twoDForm.format((c120)/(c144)));
if(c66!=0)c132=Double.parseDouble(twoDForm.format((c84)/(c66)));
if(c146!=0)c140=Double.parseDouble(twoDForm.format((c122)/(c146)));

} catch (Exception e ){
	e.printStackTrace();
}
//calculation end here
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="/jsp/map/include/html-meta.jsp" />
<script src="<%= request.getContextPath() %>/js/merchant.js"></script>
<script src="<%= request.getContextPath() %>/js/statusaction.js"></script>
<script src="<%= request.getContextPath() %>/js/vendor.js"></script>
<title>MAYBANK</title>
</head>

<body onload="vendor.esapl_form_load('<%= EncryptionHelper.encrypt(merchant_id+"") %>', '<%= EncryptionHelper.encrypt(case_id+"") %>')" >

<!-- Header -->
<%@ include file="/jsp/common/Header.jsp" %>	
<!-- End Header -->


<div class="row-fluid page">
	<div class="span12">

		<jsp:include page="/jsp/map/include/tab.jsp">
			
			<jsp:param name="active" value='<%=EncryptionHelper.encrypt("recommendation") %>' />
		</jsp:include>
		
		<jsp:include page="/jsp/map/include/recom-tab.jsp">
			
			<jsp:param name="active" value='<%=EncryptionHelper.encrypt("esa_pl") %>' />
		</jsp:include>
		
		<form name="form">
		<input type="hidden" name="<%= Constants.TOKEN_KEY %>" value="<%= session.getAttribute(Action.TRANSACTION_TOKEN_KEY) %>" >
		<div class="control-group">
			
			<div class="controls"  style="float:left;">
				<span style="font-weight: bold;">For Outlet : </span>
				<select id="outlet_id" name="outlet_id" style="width:220px">
					<%= case_outlet_opt %>
				</select>
			</div>
		</div>
		<table class="tbl pl_tbl" style="width:100%">
			<tbody class="no-border">
			<tr>
				<td class="bold underline" colspan="2">PROJECTED ANNUAL CARD SALES AND EARNINGS FOR POS FACILITY</td>
				<td></td>
				<td colspan="5"></td>
			</tr>
			<tr>
				<td class="bold" colspan="2">Merchant Name : <span><%= reg_name %></span></td>
				<td></td>
				<td colspan="5"></td>
			</tr>
			<tr>
				<td class="bold" colspan="2">Visa / Master MDR : On-us: <span><%= f5 %></span>%</td>
			</tr>
			<tr>
				<td class="bold" colspan="2">Visa / Master MDR : Off-us: <span><%= f6 %></span>%</td>
				<td></td>
				<td></td>
				<td class="underline">Visa / Master</td>
			</tr>
			<tr>
				<td colspan="2"></td>
				<td></td>
				<td class="right">MDR : </td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mdr_on_us" value="<%= String.format("%,.2f", f5) %>" /></td>
				<td>on us</td>
			</tr>
			<tr>
				<td style="width:35%"></td>
				<td class="bold center" style="width:10%">Project Sales</td>
				<td style="width:2%"></td>
				<td></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mdr_off_us" value="<%= String.format("%,.2f",f6) %>" /></td>
				<td>off us</td>
			</tr>
			</tbody>
			
			<tr>
				<td class="bold" colspan="2">Particulars</td>
				<td class="no-border"></td>
				<td class="right no-border">Visa % : </td>
				<td class="no-border"><input class="rightJustified" type="text" id="txt_visa_percent" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f8) %>"/></td>
			</tr>
			<tr>
				<td>TOTAL SALES</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_sales" value="<%= String.format("%,.2f", c9) %>"/></td>
				<td class="no-border"></td>
				<td class="right no-border">MC % : </td>
				<td class="no-border"><input class="rightJustified" type="text" readonly="readonly" id="txt_master_percent"  value="<%= String.format("%,.2f",f9) %>"/></td>
			</tr>
			<tr>
				<td>Annual & Visa MasterCard Sales</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_annual_visa_master_sales" value="<%= String.format("%,.2f", c10) %>"/></td>
				<td class="no-border"></td>
				<td class="right no-border">On-us % : </td>
				<td class="no-border"><input class="rightJustified" type="text" id="txt_vmc_on_us"  onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f10) %>"/></td>
			</tr>
			<tr>
				<td colspan="2"></td>
				<td class="no-border"></td>
				<td class="right no-border">Not-on-us % : </td>
				<td class="no-border"><input class="rightJustified" type="text" readonly="readonly" id="txt_vmc_not_on_us" value="<%= String.format("%,.2f",f11) %>" /></td>
			</tr>
			<tr>
				<td>Annual Visa Card Sales (60%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" value="<%= String.format("%,.2f",c12) %>" id="txt_annual_visa_sales" /></td>
				<td class="no-border"></td>
				<td class="right no-border">Foreign % : </td>
				<td class="no-border"><input class="rightJustified" type="text" id="txt_foreign_percent"  onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f12) %>"/></td>
			</tr>
			<tr>
				<td colspan="2"></td>
				<td class="no-border"></td>
				<td class="right no-border">Local % : </td>
				<td class="no-border"><input class="rightJustified" type="text" readonly="readonly" id="txt_local_percent"  value="<%= String.format("%,.2f",f13) %>"/></td>
			</tr>
			<tr>
				<td>On-Us Card Usage (20%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_on_us_card_usage"  value="<%= String.format("%,.2f",c14) %>" /></td>
			</tr>
			<tr>
				<td>Gross On-Us Revenue @ 1.65%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_gross_on_us_revenue"  value="<%= String.format("%,.2f", c15)%>" /></td>
				<td class="no-border"></td>
				<td class="bold" style="width:9.9%">Interchange fee</td>
				<td class="bold center" style="width:9.9%">Normal</td>
				<td class="bold center" style="width:9.9%">High End</td>
				<td class="bold center" style="width:9.9%">MOTO</td>
				<td class="bold center" style="width:9.9%">Ecomm</td>
			</tr>
			<tr>
				<td colspan="2">Less:</td>
				<td class="no-border"></td>
				<td class="bold">Visa - Local (%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_vl_normal"  value="<%= String.format("%,.2f",f16) %>" /></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_vl_high"  value="<%= String.format("%,.2f",g16) %>" /></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_vl_moto" value="<%= String.format("%,.2f",h16) %>" /> </td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_vl_ecomm" value="<%= String.format("%,.2f",i16) %>"/></td>
			</tr>
			<tr>
				<td>Cost of Fund (3.5% * 30days * Sales / 365)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_cost_fund1"  value="<%= String.format("%,.2f", c17)%>" /></td>
				<td class="no-border"></td>
				<td class="bold">Visa - Foreign (%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_vf_normal" value="<%= String.format("%,.2f",f17) %>" /></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_vf_high" value="<%= String.format("%,.2f",g17) %>" /></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_vlf_moto"  value="<%= String.format("%,.2f",h17) %>"/></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_vf_ecomm" value="<%= String.format("%,.2f",i17) %>" /></td>
			</tr>
			<tr>
				<td>Quarterly Fee (0.04%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_quarter_fee1"  value="<%= String.format("%,.2f", c18) %>" /></td>
				<td class="no-border"></td>
				<td class="bold">MC - Local (%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_ml_normal"  value="<%= String.format("%,.2f",f18) %>" /></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_ml_high" value="<%= String.format("%,.2f",g18) %>" /></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_ml_moto" value="<%= String.format("%,.2f",h18) %>" /></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_ml_ecomm" value="<%= String.format("%,.2f",i18) %>"/></td> 
			</tr>
			<tr>
				<td class="bold">Nett earnings for On-Us Visa</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_on_us_visa_nett_earning"  value="<%= String.format("%,.2f", c19)%>" /></td>
				<td class="no-border"></td>
				<td class="bold">MC - Foreign (%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mf_normal"  value="<%= String.format("%,.2f",f19) %>"/></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mf_high" value="<%= String.format("%,.2f",g19) %>"  /></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mf_moto" value="<%= String.format("%,.2f",h19) %>"  /></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mf_ecomm" value="<%= String.format("%,.2f",i19) %>" /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td>Not On-Us Card Usage (80%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_not_on_us_card_usage"  value="<%= String.format("%,.2f", c21) %>"/></td>
				<td class="no-border"></td>
				<td></td>
				<td class="bold center">Visa</td>
				<td class="bold center">MC</td>
			</tr>
			<tr>
				<td>Local Not On-Us (90%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_local_not_on_us"  value="<%= String.format("%,.2f", c22)%>" /></td>
				<td class="no-border"></td>
				<td class="bold">Petrol (%)</td>
				<td><input class="rightJustified" type="text" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",f22) %>" id="txt_visa_petrol" /></td>
				<td><input class="rightJustified" type="text"  onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",g22) %>" id="txt_mc_petrol" /></td>
			</tr>
			<tr>
				<td>Foreign Not On-Us (10%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_foreign_not_on_us"  value="<%= String.format("%,.2f", c23) %>"/></td>
				<td class="no-border"></td>
				<td class="bold">Government (%)</td>
				<td><input class="rightJustified" type="text"  onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f23) %>" id="txt_visa_gov" /></td>
				<td><input class="rightJustified" type="text" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",g23) %>" id="txt_mc_gov" /></td>
			</tr>
			<tr>
				<td>Gross Not On-Us Revenue @ 1.65%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_gross_not_on_us_revenue" value="<%= String.format("%,.2f", c24)  %>"/></td>
				<td class="no-border"></td>
				<td class="bold">Charities (%)</td>
				<td><input class="rightJustified" type="text" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",f24) %>" id="txt_visa_charities" /></td>
				<td><input class="rightJustified" type="text" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",g24) %>" id="txt_mc_charities" /></td>
			</tr>
			<tr>
				<td colspan="2">Less:</td>
				<td class="no-border"></td>
				<td class="bold">Emerging Market (%)</td>
				<td><input class="rightJustified" type="text"  onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f25) %>" id="txt_visa_emarket" /></td>
				<td><input class="rightJustified" type="text" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",g25) %>" id="txt_mc_emarket" /></td>
				<td class="no-border" colspan="2"> (Transportation, Taxi, Tolls, Fast Food, Parking, Theaters)</td>
			</tr>
			<tr>
				<td>Interchange fees Local @ 1.20%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_interchange_fee_local"  value="<%= String.format("%,.2f", c26)%>" /></td>
				<td class="no-border"></td>
				<td class="bold">Insurance (%)</td>
				<td><input class="rightJustified" type="text" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",f26) %>" id="txt_visa_insurance" /></td>
				<td><input class="rightJustified" type="text"  onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",g26) %>" id="txt_mc_insurance" /></td>
			</tr>
			<tr>
				<td>Interchange fees Foreign @ 1.50%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_interchange_fee_foreign"  value="<%= String.format("%,.2f", c27)%>" /></td>
				<td class="no-border"></td>
				<td class="bold">Supermarkets (%)</td>
				<td><input class="rightJustified" type="text"  onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f27) %>" id="txt_visa_supermarket" /></td>
				<td><input class="rightJustified" type="text" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",g27) %>" id="txt_mc_supermarket" /></td>
			</tr>
			<tr>
				<td>Quarterly Fee (0.07%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_quarter_fee2"  value="<%= String.format("%,.2f", c28)%>"  /></td>
				<td class="no-border"></td>
				<td class="bold">Utilities (%)</td>
				<td><input class="rightJustified" type="text" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",f28) %>" id="txt_visa_utilities" /></td>
				<td><input class="rightJustified" type="text" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",g28) %>" id="txt_mc_utilities" /></td>
			</tr>
			<tr>
				<td>Base II Charges (RM 0.0233 p/trx) - local</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_base2_charge_local"  value="<%= String.format("%,.2f", c29)%>"  /></td>
			</tr>
			<tr>
				<td>Base II Charges (RM 0.264 p/trx) - foreign</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_base2_charge_foreign"   value="<%= String.format("%,.2f", c30)%>" /></td>
			</tr>
			<tr>
				<td>Int'l Outgoing fee (0.20%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_int_out_fee"  value="<%= String.format("%,.2f", c31)%>"  /></td>
			</tr>
			<tr>
				<td>ISA Fee (0.4%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_isa_fee"  value="<%= String.format("%,.2f", c32)%>"  /></td>
			</tr>
			<tr>
				<td>Cost of fund (3.5% * 3days * Sales / 365)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_cost_fund2"  value="<%= String.format("%,.2f", c33)%>"  /></td>
			</tr>
			<tr>
				<td>Total Cost for Not On-Us Card Usage</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_visa_cost_not_on_us_card_usage"  value="<%= String.format("%,.2f", c34)%>"  /></td>
			</tr>
			<tr>
				<td class="bold">Nett earnings for Not-On-Us Visa</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_nett_earning_not_on_us_visa"  value="<%= String.format("%,.2f", c35)%>"  /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td class="bold">Total earnings from Visa Acquiring Business</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_earning_visa_aqbs"   value="<%= String.format("%,.2f", c37)%>" /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td>Annual MasterCard Sales (40%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_annual_mc_sales"   value="<%= String.format("%,.2f", c39)%>" /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td>On-Us Card Usage (10%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_on_us_card_usage"   value="<%= String.format("%,.2f", c41)%>" /></td>
			</tr>
			<tr>
				<td>Gross On-Us Revenue @ 1.65%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_gross_on_us_rev"   value="<%= String.format("%,.2f", c42)%>" /></td>
			</tr>
			<tr>
				<td colspan="2">Less:</td>
			</tr>
			<tr>
				<td>Cost of fund (3.5% * 30days * Sales / 365)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_cost_fund1"   value="<%= String.format("%,.2f", c44)%>" /></td>
			</tr>
			<tr>
				<td>Quarterly Fee (0.06%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_quarter_fee3"  value="<%= String.format("%,.2f", c45)%>" /></td>
			</tr>
			<tr>
				<td class="bold">Nett earnings for On-Us MasterCard</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_nett_earn_on_us_mc"   value="<%= String.format("%,.2f", c46)%>" /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td>Not On-Us Card Usage (90%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_not_on_us_card_usage"   value="<%= String.format("%,.2f", c48)%>" /></td>
			</tr>
			<tr>
				<td>Local Not On-Us (90%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_local_not_on_us"   value="<%= String.format("%,.2f", c49)%>" /></td>
			</tr>
			<tr>
				<td>Foreign Not On-Us (10%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_foreign_not_on_us"   value="<%= String.format("%,.2f", c50)%>" /></td>
			</tr>
			<tr>
				<td>Gross Not On-Us Revenue @ 1.65%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_gross_not_on_us_rev"   value="<%= String.format("%,.2f", c51)%>" /></td>
			</tr>
			<tr>
				<td colspan="2">Less:</td>
			</tr>
			<tr>
				<td>Interchange fees Local @ 1.32%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_int_fee_local"   value="<%= String.format("%,.2f", c53)%>" /></td>
			</tr>
			<tr>
				<td>Interchange fees Foreign</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_int_fee_foreign"   value="<%= String.format("%,.2f", c54)%>" /></td>
			</tr>
			<tr>
				<td>Local Outgoing fee (0.020%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_local_outgoing_fee"   value="<%= String.format("%,.2f", c55)%>" /></td>
			</tr>
			<tr>
				<td>Int'l Outgoing fee (0.184%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_int_outgoing_fee"   value="<%= String.format("%,.2f", c56)%>" /></td>
			</tr>
			<tr>
				<td>Base I Charges (RM 0.0155 p/trx) - local</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_base1_local_charge"   value="<%= String.format("%,.2f", c57)%>" /></td>
			</tr>
			<tr>
				<td>Base I Charges (RM 0.0155 p/trx) - foreign</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_base1_foreign_charge"   value="<%= String.format("%,.2f", c58)%>" /></td>
			</tr>
			<tr>
				<td>Base II Charges (RM 0.109 p/trx) - local</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_base2_local_charge"   value="<%= String.format("%,.2f", c59)%>" /></td>
			</tr>
			<tr>
				<td>Base II Charges (RM 0.2635 p/trx) - foreign</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_base2_foreign_charge"   value="<%= String.format("%,.2f", c60)%>" /></td>
			</tr>
			<tr>
				<td>Cost of Funds (3.5% * 3days * Sales / 365days)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_cost_fund2"   value="<%= String.format("%,.2f", c61)%>" /></td>
			</tr>
			<tr>
				<td>Total Cost for Not On-Us Card Usage</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_mc_cost_not_on_us_card_usage"   value="<%= String.format("%,.2f", c62)%>" /></td>
			</tr>
			<tr>
				<td class="bold">Total nett earnings for Not On-Us MasterCard</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_nett_earning_not_on_us_mc"  value="<%= String.format("%,.2f", c63)%>" /></td>
			</tr>
			<tr>
				<td class="bold">Total earnings from MasterCard Acquiring Business</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_earning_mc_aqbs"   value="<%= String.format("%,.2f", c64)%>" /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td>Annual Amex Sales</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_sales" value="<%= String.format("%,.2f",c66) %>"  /></td>
				<td class="no-border"></td>
				<td class="bold" colspan="2">Input (Amex)</td>
			</tr>
			<tr>
				<td colspan="2"></td>
				<td class="no-border"></td>
				<td>MDR : </td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_mdr" value="<%= String.format("%,.2f",f67) %>" /></td>
				<td class="no-border" colspan="3"></td>
			</tr>
			<tr>
				<td>On-Us Card Usage (90%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_on_us_card_usage"   value="<%= String.format("%,.2f", c68)%>"  /></td>
				<td class="no-border"></td>
				<td>On-us % : </td>
				<td><input class="rightJustified" type="text" id="txt_amex_on_us" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f68) %>"/></td>
			</tr>
			<tr>
				<td>Gross On-Us Revenue @ 2.75%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_gross_rev"  value="<%= String.format("%,.2f", c69)%>"  /></td>
				<td class="no-border"></td>
				<td>Not-on-us % : </td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_not_on_us" value="<%= String.format("%,.2f", f69) %>"/></td>
			</tr>
			<tr>
				<td colspan="2">Less:</td>
				<td class="no-border"></td>
				<td>Payment Plan : </td>
				<td><input class="rightJustified" type="text" id="txt_amex_playment_plan" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.0f",f70) %>"/></td>
			</tr>
			<tr>
				<td>Cost of fund (3.5% * 30days * Sales / 365)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_cost_of_fund1"   value="<%= String.format("%,.2f", c71)%>" /></td>
				<td class="no-border"></td>
				<td>Interchange : </td>
				<td><input class="rightJustified" type="text" id="txt_amex_interchange" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f71) %>"/></td>
			</tr>
			<tr>
				<td>Royalty fee to Amex (0.58%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_royalty_fee1"   value="<%= String.format("%,.2f", c72)%>" /></td>
				<td class="no-border"></td>
				<td  colspan="2">Own EDC Terminal</td>
				
			</tr>
			<tr>
				<td class="bold">Net earnings for On Us Amex</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_net_earning"   value="<%= String.format("%,.2f", c73)%>" /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td>Not On-Us Card Usage (10%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_not_on_us_card_usage"   value="<%= String.format("%,.2f", c75)%>" /></td>
				<td class="no-border"></td>
				<td class="bold underline" colspan="2">Interchange Fee</td>
			</tr>
			<tr>
				<td>Gross Not On-Us Revenue @ 3.95%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_gross_not_on_us_rev"   value="<%= String.format("%,.2f", c76)%>"  /></td>
				<td class="no-border"></td>
				<td>Petrol (%)</td>
				<td><input class="rightJustified" type="text" id="txt_intfee_petrol" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f76) %>"/></td>
			</tr>
			<tr>
				<td colspan="2"></td>
				<td class="no-border"></td>
				<td>Fast Food (%)</td>
				<td><input class="rightJustified" type="text" id="txt_intfee_ffood" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f77) %>"/></td>
			</tr>
			<tr>
				<td colspan="2">Less:</td>
				<td class="no-border"></td>
				<td>Insurance (%)</td>
				<td><input class="rightJustified" type="text" id="txt_intfee_insurance" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f78) %>"/></td>
			</tr>
			<tr>
				<td>Interchange fees @ 1.75%</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_interchange_fee"  value="<%= String.format("%,.2f", c79)%>"  /></td>
				<td class="no-border"></td>
				<td>Education (%)</td>
				<td><input class="rightJustified" type="text" id="txt_intfee_education" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f79) %>"/></td>
			</tr>
			<tr>
				<td>Cost of fund (3.5% * (3days-PayPlan) * Sales / 365)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_cost_of_fund2"   value="<%= String.format("%,.2f", c80)%>" /></td>
				<td class="no-border"></td>
				<td>Government (%)</td>
				<td><input class="rightJustified" type="text" id="txt_intfee_government" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f80) %>"/></td>
			</tr>
			<tr>
				<td>Royalty fee to Amex (0.29%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_royalty_fee2"  value="<%= String.format("%,.2f", c81)%>"  /></td>
				<td class="no-border"></td>
				<td>Hypermarket (%)</td>
				<td><input class="rightJustified" type="text" id="txt_intfee_hypermarket" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f81) %>"/></td>
			</tr>
			<tr>
				<td class="bold">Nett earnings for Not-On-Us Amex</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_net_erarning_not_on_us"   value="<%= String.format("%,.2f", c82)%>"  /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td class="bold">Total Gross earnings from Amex Acquiring Business</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_amex_total_gross_aqbs"  value="<%= String.format("%,.2f", c84)%>"  /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td class="bold">Total Gross Earning From Visa and MasterCard and Amex</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_gross_visamcamex"   value="<%= String.format("%,.2f", c87)%>" /></td>
				<td class="no-border"></td>
				<td class="bold" colspan="2">Input (Debit)</td>
			</tr>
			<tr>
				<td colspan="2"></td>
				<td class="no-border"></td>
				<td>MDR : </td>
				<td><input class="rightJustified"  readonly="readonly" type="text" id="txt_debit_mdr" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f88) %>"/></td>
			</tr>
			<tr>
				<td class="bold">Projected Debit Card Sales</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_projected_sales" value="<%= String.format("%,.2f",c89) %>" /></td>
				<td class="no-border"></td>
				<td>On-us % : </td>
				<td><input class="rightJustified" type="text" id="txt_debit_on_us_percent" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",f89) %>"/></td>
			</tr>
			<tr>
				<td class="bold">KawanKu E-Pos</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_kwnku_epos"   value="<%= String.format("%,.2f", c90)%>" /></td>
				<td class="no-border"></td>
				<td>Not-on-us % : </td>
				<td><input class="rightJustified" type="text" readonly="readonly"  id="txt_debit_not_on_us_percent" value="<%= String.format("%,.2f", f90) %>"/></td>
			</tr>
			<tr>
				<td>Gross Earnings from E-POS</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_gross_earning_epos"  value="<%= String.format("%,.2f", c91)%>"  /></td>
			</tr>
			<tr>
				<td>Less Computer Time (Kawanku E-Pos sales / ATS*RM 0.05)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_less_computer_time"  value="<%= String.format("%,.2f", c92)%>"  /></td>
			</tr>
			<tr>
				<td class="bold">Earnings from Kawanku E-POS</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_earning_kwnku_epos"   value="<%= String.format("%,.2f", c93)%>" /></td>
			</tr>
			<tr>
				<td class="bold">MEPS E-POS</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_meps_epos"  value="<%= String.format("%,.2f", c94)%>"  /></td>
			</tr>
			<tr>
				<td>Gross Earnings from MEPS E-POS</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_gross_earning_meps_epos"   value="<%= String.format("%,.2f", c95)%>" /></td>
			</tr>
			<tr>
				<td>Less Switching Fee (0.1%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_less_switching_fee"  value="<%= String.format("%,.2f", c96)%>"  /></td>
			</tr>
			<tr>
				<td>Less Issuing Fee (Meps E-POS Sales * 0.40%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_less_issuing_fee"  value="<%= String.format("%,.2f", c97)%>"  /></td>
			</tr>
			<tr>
				<td class="bold">Earnings from MEPS Epos</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_earning_meps_epos"  value="<%= String.format("%,.2f", c98)%>"  /></td>
			</tr>
			<tr>
				<td class="bold">Nett Earnings From Debit Card</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debit_nett_earning"  value="<%= String.format("%,.2f", c99)%>"  /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td class="bold">Sub Total Revenue</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_sub_total_revenue"   value="<%= String.format("%,.2f", c101)%>" /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td class="bold">Terminal Rental Fees Earning</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_terminal_rental_earning" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",c103) %>"/></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td class="bold" colspan="2">Less:</td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;-  Overhead Cost, terminal maintenance cost (RM 12 / mth)</td>
				<td><input class="rightJustified" type="text" id="txt_overhead_maintenance_cost" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c106) %>"/></td>
				<td class="no-border"></td>
				<td class="bold underline">EDCs</td>
				<td class="bold center">Number</td>
				<td class="bold center">Cost</td>
				<td class="bold center">Total Cost</td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;-  EDC terminal cost (amortize for 4 years)</td>
				<td><input class="rightJustified" type="text" id="txt_edc_terminal_cost" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c107) %>"/></td>
				<td class="no-border"></td>
				<td>Wired IP/DU</td>
				<td><input class="rightJustified" type="text" id="txt_wired_num" onkeypress="return vendor.isNumberKeyOnly(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.0f",f107) %>"/></td>
				<td><input class="rightJustified" type="text" id="txt_wired_cost" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",g107) %>"/></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_wired_tcost"  value="<%= String.format("%,.2f",h107) %>" /></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;-  Annual Leaseline Cost</td>
				<td><input class="rightJustified" type="text" id="txt_annual_leaseline_cost" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c108) %>"/></td>
				<td class="no-border"></td>
				<td>Wireless GPRS</td>
				<td><input class="rightJustified" type="text" id="txt_wireless_num" onkeypress="return vendor.isNumberKeyOnly(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.0f",f108) %>"/></td>
				<td><input class="rightJustified" type="text" id="txt_wireless_cost" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",g108) %>"/></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_wireless_tcost"  value="<%= String.format("%,.2f",h108) %>" /></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;-  One time setup cost for leaseline (including cabling)</td>
				<td><input class="rightJustified" type="text" id="txt_onetimesetup_cost"  onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",c109) %>"/></td>
				<td class="no-border"></td>
				<td>Total</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_num"  value="<%= String.format("%,.0f",f109) %>" /></td>
				<td></td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_tcost"  value="<%= String.format("%,.2f",h109) %>" /></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;- Sim Card Cost (RM 15 / mth) (gprs)</td>
				<td><input class="rightJustified" type="text" id="txt_sim_cost1" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c110) %>"/></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;- Telephone Charges (annual charges)</td>
				<td><input class="rightJustified" type="text" id="txt_tel_charges" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c111) %>"/></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;- Sponsorship Fee</td>
				<td><input class="rightJustified" type="text" id="txt_sponsorship_fee" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c112) %>"/></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;- Amex Tag On Fee (RM 15 / mth / terminal)</td>
				<td><input class="rightJustified" type="text" id="txt_amex_tag_on" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c113) %>"/></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;- Signing fees</td>
				<td><input class="rightJustified" type="text" id="txt_amex_signing_fee" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c114) %>"/></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;- Set-up fees (terminal maintenances fees)</td>
				<td><input class="rightJustified" type="text" id="txt_setup_fee" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c115) %>"/></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;- Sim Card Cost (RM 15 / mth) (gprs)</td>
				<td><input class="rightJustified" type="text" id="txt_sim_cost2" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c116) %>"/></td>
			</tr>
			<tr>
				<td>Total Cost</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_less_cost"  value="<%= String.format("%,.2f",c117) %>" /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td>Net Profit</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_net_profit" value="<%= String.format("%,.2f",c119) %>" /></td>
			</tr>
			<tr>
				<td>Net Profit After Tax</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_net_profit_after_tax"  value="<%= String.format("%,.2f",c120) %>" /></td>
			</tr>
			<tr>
				<td>Less Cost of Debt (4%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_cost_debt"  value="<%= String.format("%,.2f",c121) %>" /></td>
			</tr>
			<tr>
				<td>Profit after tax & Cost of Debts</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_profit_after_taxcostdebt" value="<%= String.format("%,.2f",c122) %>"  /></td>
			</tr>
			<tr>
				<td>Less Cost of Equity (11%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_cost_equity" value="<%= String.format("%,.2f",c123) %>"  /></td>
			</tr>
			<tr>
				<td>Economic Profit</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_economic_profit" value="<%= String.format("%,.2f",c124) %>"  /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td>Total number of transactions</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_no_transaction" value="<%= String.format("%,.2f",c126) %>"  /></td>
			</tr>
			<tr>
				<td>Total sales volume</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_sales_volume" value="<%= String.format("%,.2f",c127) %>"  /></td>
			</tr>
			<tr>
				<td>Average ticket size</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_avr_tic_size" value="<%= String.format("%,.2f",c128) %>"  /></td>
			</tr>
			<tr>
				<td>Return on credit card sales (%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_rocc_sales" value="<%= String.format("%,.2f",c129 * 100) %>"  /></td>
			</tr>
			<tr>
				<td>Return on Visa Sales (%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_rov_sales" value="<%= String.format("%,.2f",c130 * 100) %>"  /></td>
			</tr>
			<tr>
				<td>Return on MasterCard Sales (%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_romc_sales"  value="<%= String.format("%,.2f",c131 * 100) %>" /></td>
			</tr>
			<tr>
				<td>Return on Amex Sales (%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_roamex_sales" value="<%= String.format("%,.2f",c132 * 100) %>"  /></td>
			</tr>
			<tr>
				<td>No. of MBB EDC Terminal</td>
				<td><input class="rightJustified" type="text" id="txt_no_mbbedc_terminal" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()" value="<%= String.format("%.2f",c133) %>"/></td>
			</tr>
			<tr>
				<td>Terminal maintenance cost per EDC per month</td>
				<td><input class="rightJustified" type="text" id="txt_terminal_cost_edc_permonth" onkeypress="return vendor.isNumberKey(event)" onkeyup="vendor.calculate()"  value="<%= String.format("%.2f",c134) %>"/></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td class="bold">Total Cost</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_cost"  value="<%= String.format("%,.2f",c136) %>" /></td>
			</tr>
			<tr>
				<td class="bold">Total Income</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_total_income"  value="<%= String.format("%,.2f",c137) %>" /></td>
			</tr>
			<tr>
				<td class="bold">Cost To Income - CTI ratio %</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_cost_income"  value="<%= String.format("%,.2f",c138 * 100) %>" /></td>
			</tr>
			<tr>
				<td class="bold">RRWA (Return on Risk Weighted Assets) %</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_rrwa" value="<%= String.format("%,.2f",c139 * 100) %>"  /></td>
			</tr>
			<tr>
				<td class="bold">ROE (Return on Equity) %</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_row" value="<%= String.format("%,.2f",c140 * 100) %>"  /></td>
			</tr>
			<tr>
				<td class="bold">ROCE (Return on Capital Employed) %</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_roce"  value="<%= String.format("%,.2f",c141 * 100) %>" /></td>
			</tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td>RWA</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_rwa"  value="<%= String.format("%,.2f",c143) %>" /></td>
			</tr>
			<tr>
				<td>Capital Allocated (13%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_capital_allocated" value="<%= String.format("%,.2f",c144) %>"  /></td>
			</tr>
			<tr>
				<td>Debt (40%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_debt" value="<%= String.format("%,.2f",c145) %>"  /></td>
			</tr>
			<tr>
				<td>Equity (60%)</td>
				<td><input class="rightJustified" type="text" readonly="readonly" id="txt_equity"  value="<%= String.format("%,.2f",c146) %>" /></td>
			</tr>
		</table>
		<div class="row-fluid">
			<div class="span12 btn-control">
				<input id="click_redirect" name="click_redirect" type="hidden" value="" />
				<button type="button" class="btn" id="submit" onclick="vendor.create_esapl('<%= EncryptionHelper.encrypt(case_id+"") %>', '<%= EncryptionHelper.encrypt(o_id+"") %>')" >Save</button>
			</div>
		</div>
		</form>
	</div>
</div>

<!-- Footer -->
<%@ include file="/jsp/common/Footer.jsp" %>	
<!-- End Footer -->


</body>
</html>